PATH=/usr/sbin:/usr/bin:$PATH

# errors shouldn't cause script to exit
set +e

install_default_file() {
	if [ ! -f "$1" ]; then
		cp -a $2 $1
		if [ -n "$3" ]; then
			chmod $3 $1
		fi
	fi
}

after_install() {
	:
	${AFTER_INSTALL_SCRIPT}
}


after_upgrade() {
	:
	${AFTER_UPGRADE_SCRIPT}
}

if [ "$1" -eq 1 ]; then
	# "after install" goes here
	after_install
elif [ "$1" -gt 1 ]; then
	# "after upgrade" goes here
	after_upgrade
fi

# clear error termination state
set -e
